package com;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.ecbt.rest.util.ExcelHelper;

public class TestReadExcel {
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public static void main(String[] args) {
		File newFile = new File("D:\\AijunTao\\Desktop\\黑名单监控.xlsx");
		List<List<String>> resultList = new ArrayList<>();
		try {
			resultList = ExcelHelper.readExcel2List(newFile);
		} catch (Exception e) {
			e.printStackTrace();
		}
		List<List> boxes = new ArrayList<>();
		for (int i = 1; i < resultList.size(); i++) {
			List one = (List) resultList.get(i);
			String panl = one.get(3).toString();
			for (String s : panl.split(",")) {
				List<String> l = new ArrayList<>();
				l.add(one.get(0).toString());
				l.add(one.get(2).toString());
				l.add(s);
				boxes.add(l);
			}
		}
		int idx = 1;
		for (List one : boxes) {
			System.out.format("%5s|", idx++);
			for (Object s : one) {
				System.out.printf("@%15s|", s);
			}
			System.out.println();
		}
	}
}
